﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using Keiho.ServiceModel;

[ServiceContract]
public interface IMembershipService
{
    [OperationContract]
    [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
    ServiceResponse<bool> SignIn(MembershipInfo info);

    [OperationContract]
    [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
    ServiceResponse SignOut();
}

[DataContract]
[DebuggerDisplay(@"\{{UserId}\}")]
public class MembershipInfo
{
    [DataMember(EmitDefaultValue = false)]
    public string UserId { get; set; }

    [DataMember(EmitDefaultValue = false)]
    public string Password { get; set; }
}
